package common.utils;

import java.util.concurrent.TimeUnit;

import rx.Observable;

/**
 * Created by yinzhiqun on 2016/1/20.
 */
public class ClickTransformer implements Observable.Transformer<Void,Void>  {

    private static ClickTransformer mInstance;
    public static ClickTransformer getInstance(){
        if (mInstance==null){
            mInstance = new ClickTransformer();
        }
        return mInstance;
    }

    @Override
    public Observable<Void> call(Observable<Void> observable) {
        return observable.throttleFirst(500, TimeUnit.MILLISECONDS);
    }
}
